package io.tim.mvc_f2.proxy.test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test04 {

	public static void main(String[] args) {
		// 获取 Spring Context
		ApplicationContext context = new ClassPathXmlApplicationContext("io/tim/mvc_f2/proxy/test/Spring.xml");
		// 根据 id 从 Context 中获取 Bean 对象，即代理对象
		Hello hello = (Hello) context.getBean("greetingProxy");
		// 调用代理的方法
		hello.say("Spring AOP");
	}
}
